/**
 * modal
 */
.modal-window {
    @include flexbox();
    background: rgba(0, 0, 0, .1);
    bottom: 0;
    height: 100%;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    width: 100%;
    z-index: $max-z-index;
    align-items: center;
    justify-content: center;

    .modal-background {
        bottom: 0;
        left: 0;
        position: absolute;
        right: 0;
        top: 0;
        z-index: -1;
    }

    .modal-body {
        @include flexbox();
        max-height: 100%;
        ::-webkit-scrollbar {
            display: none;
        }
    }

    .notification {
        width: 32.2rem;
        height: 25rem;
        background-color: #F8F8F8;
        position: relative;
        max-height: 100%;
        overflow: hidden;

        .btn-default{
            background: #F8F8F8;
        }

        .modal-content {
            height: 80%;

            .wrapper {
                display:-webkit-box;
                -webkit-box-pack:center;
                -webkit-box-align:center;
                text-align: center;
            }

            h4 {
                margin: 0;
                font-size: 2em;
                color: #B3B3B3;
                display: inline-block;
            }

            span {
                font-size: 1.8em;
                color: #B3B3B3;
                display: inline-block;
                padding: 0 21px;
            }
        }

        .modal-actions {
            text-align: center;

            .btn {
                color: #B3B3B3;
                border: 1px solid #B3B3B3;
                width: 13rem;
                margin: 0 5px;
            }
        }
    }

    .modal-alert {
        @include flexbox();
        background: #F8F8F8;
        flex-direction: column;
        min-height: 100px;
        overflow: auto;
        padding: 1.6rem;
        position: relative;
        text-align: center;
        align-items: center;
        justify-content: space-between;
        width: 38.2rem;

        .caption {
            margin: 0 0 1.6rem 0;
            color: #626262;
        }

        .message {
            color: #333;
            margin: 0 0 20px 0;
            text-align: left;
            line-height: 1.4em;
            word-break: break-word;
            white-space: pre-wrap;

            a {
                font-size: 1em;
            }
        }

        .caption,
        .message {
            width: 100%;
        }

        .btn {
            min-width: 50px;
        }

        .btn-default{
            background: #F8F8F8;
        }

        .spinner-roller-reverse {

            background: linear-gradient(to right, #DEDEDC 10%, rgba(248, 248, 248, 0) 42%);

            &::before {
                background-color: #F8F8F8;
            }

            &::after {
                background-color: #F8F8F8;
            }
        }

    }

    .message {
        font-family: "Helvetica Neue", "HelveticaNeue-Light", "Helvetica Neue Light", Helvetica, Arial, "Lucida Grande", sans-serif, "Microsoft JhengHei", "微軟正黑體";
        margin: 0;
        overflow: hidden;
        padding: 0;
        position: relative;
        word-break: break-all;
        word-wrap: break-word;
    }

    .btn-h-group {
        width: 100%;

        .btn {
            font-size: 1.3rem;
            height: 2.8rem;
            line-height: calc(2.8rem - 4px);    // borders are 2px
            margin: 0 .6rem 0 0;
            max-width: 13rem;

            &:last-child {
                margin: 0;
            }
        }
    }
}

.modal-progress {
    z-index: 99999;
    .modal-alert {
        min-height: 10rem;
        text-align: left;
        padding: 1.6rem 0 0 0;
        width: 32.2rem;

        .caption {
            color: #626262;
            font-size: 15px;
            line-height: 18px;
            text-align: left;
            padding: 0 1.6rem;
            margin: 0;
        }

        .message {
            color: #333;
            padding: 0 1.6rem;
            margin: 0 0 20px 0;
        }
    }

    .message p {
        font-size: 14px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-transform: capitalize;
    }

    .spinner-roller {
        background: linear-gradient(to right, #DEDEDC 10%, rgba(255, 255, 255, 0) 42%);
        height: 5rem;
        margin: 0 auto 1.6rem auto;
        width: 5rem;

        &::after {
            background: #fff;
        }
    }

    .progress-bar {
        background: #ccc;
        height: 2rem;
        overflow: hidden;

        .current-progress {
            background: #777;
            content: "";
            display: block;
            height: 100%;
            width: 0;
            transition: width 0.3s;
        }
    }

    &.waiting{
        .modal-alert{
            padding-bottom: 1.6em;
        }
    }
}

// progress dialog size
.modal-progress-nonstop {
    .spinner-roller {
        height: 4rem;
        margin: auto;
        width: 4rem;
    }

    .modal-body {
        width: 160px;
        height: 160px;
    }

    .modal-alert {
        height: 8rem;
        min-height: 8rem;
        width: 100%;
        height: 100%;
    }
}

.modal-progress-nonstop-with-message {
    .spinner-roller {
        height: 4rem;
        margin: auto;
        width: 4rem;
    }

    .modal-alert {
        min-height: 8rem;
        width: 100%;

        .caption {
            padding-bottom: 1rem;
        }
    }
}

.modal-input-lightbox {
    .modal-alert {
        min-height: 18rem;
        text-align: left;
        padding: 1.6rem 0 0 0;
        width: 32.2rem;

        .caption {
            color: #626262;
            font-size: 15px;
            line-height: 18px;
        }

        .caption,
        .message {
            padding: 0 1.6rem;
            margin: 0 0 20px 0;
        }
    }

    .control {
        @include flexbox();
        justify-content: space-between;
        align-items: center;

        .inputHeader {
            color: #909090;
            flex: 1;
        }

        input {
            border: 2px solid #CCC;
            flex: 2;
            padding: 3px;
        }
    }

    .btn-h-group {
        border: none;
        border-top: 1px solid #ccc;
        bottom: 0;
        left: 0;
        padding: 1.6rem 1.6rem 1.6rem 0;
        right: 0;
        justify-content: flex-end;
    }
}

.modal-update {
    color: #989898;

    .update-wrapper {
        background: #fff;
        padding: 20px;
        width: 32.2rem;
    }

    .caption {
        color: #626262;
        font-size: 15px;
        line-height: 18px;
    }

    .caption,
    .update-brief,
    .release-note-content {
        margin: 0 0 20px 0;
    }

    .update-brief {
        font-size: 12px;
        line-height: 18px;

        p {
            margin: 0;
        }
    }

    .release-note-caption {
        margin: 0;
        font-weight: normal;
    }

    .release-note-content {
        border: 2px solid #989898;
        height: 90px;
        overflow: scroll;
        padding: 3px;
    }

    .action-button {
        @include flexbox();
        justify-content: space-between;
    }

    .btn-h-group {
        display: block;
        flex: 1;
        text-align: right;
    }
}

.modal-change-filament, .modal-camera-calibration {
    .guide-image {
        border: 2px solid #000;
        display: block;
        margin: 0 auto;
        width: 100%;
    }

    .modal-alert {
        width: 440px;
        /* min-height: 320px; */
        padding: 22px 0 0 0;
    }

    .caption,
    .message {
        margin: 0 0 20px 0;
        padding: 0 19px;
    }

    .caption {
        color: #626262;
        font-size: 15px;
        line-height: 17px;
        text-align: left;
    }

    .message {
        color: #989898;
        font-size: 15px;
        line-height: 21px;
        text-align: center;

        p {
            margin: 0;
        }
    }

    .temperature {
        span {
            margin: 0 5px 0 0;
        }
    }

    .message-container {
        text-align: center;

        p:last-of-type {
            margin: 0 0 12.5px 0;
        }
    }

    .way-to-go {
        .btn {
            width: 100%;

            &:first-child, &:nth-child(2) {
                margin: 0 0 24px 0;
            }
        }
    }

    .spinner-roller {
        height: 61.5px;
        margin: 0 auto;
        width: 61.5px;
    }

    .button-group {
        border: none;
        border-top: 1px solid #E0E0DF;
        display: block;
        height: 73px;
        padding: 19px;
        position: relative;

        .btn {
            margin: 0;
            padding: 0 10px;
        }

        .btn-icon {
            background: #F8F8F8;
            border: none;
            color: #B3B3B3;
            cursor: initial;
            max-width: none;
            @include flexbox();
            justify-content: space-between;
        }

        .auto-emerging {
            margin: 0 5px 0 0;
        }

        .spinner-roller {
            height: 33px;
            margin: 0;
            padding: 0;
            width: 33px;
        }

        .btn:first-child:not([class*="btn-alone"]),
        .btn-alone-left {
            position: absolute;
            left: 19px;
        }

        .btn:last-child:not([class*="btn-alone"]),
        .btn-alone-right {
            position: absolute;
            right: 19px;
            min-width: 60px;
        }
    }
}

.modal-camera-calibration {
    .button-group {
        .btn {
            
            &.btn-alone-right-1 {
                position: absolute;            
                width: 80px;
                right: 19px;
            }
            &.btn-alone-right-2 {
                position: absolute;            
                width: 80px;
                right: 110px;
            }
        }
    }
}

.shadow-modal {
    .modal-body {
        box-shadow: 0 7px 15px rgba(0, 0, 0, .2), 0 10px 20px rgba(0, 0, 0, 0.1);
    }
}

.modal-progress.modal-window {
    .button-group button.btn-default {
        margin-bottom: 15px;
    }
}

.head-temperature {

    .section {
        padding: 10px 0;

        > div {
            display: inline-block;
        }

        .title {
            width: 150px;
            display: inline-block;;
        }

        input { width: 50px; }

        button { margin-left: 20px; }
    }

    label {
        color: #B3B3B3;
    }
}
